package com.tarena.lbs.basic.pojo.vo;

import com.tarena.lbs.basic.pojo.po.AreaPO;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.io.Serializable;
import java.util.List;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class AreaVO implements Serializable {

    Long id;

    Long parentId;

    String name;

    List<AreaVO> children;

    public AreaVO(AreaPO areaPO) {
        // 假设使用类似属性赋值
        this.id = areaPO.getId();
        this.name = areaPO.getName();
        this.parentId = areaPO.getParentId();
    }
}